{rsms:config.pagesize value="20"/}
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
<title>用户登录信息统计</title>
<link href='css/base.css' rel='stylesheet' type='text/css'>
<script language='javascript'>
function Sel(stype)
{
	  for(var i=0;i < document.getElementsByName('aids').length;i++)
	  {
		  if(stype=='all') document.getElementsByName('aids')[i].checked=true;
		  else document.getElementsByName('aids')[i].checked=false;
	  }
}
function checkSubmit(etype)
{
	var str = '';
	if (etype == "total")
		location="export_userlogin_info.php?type=total";
	else if (etype == "period")
	{
		var stime = document.getElementById('starttime').value;
		var etime = document.getElementById('endtime').value;
		location="export_userlogin_info.php?type=period&starttime="+stime+"&endtime="+etime;
	}
	else {
		for(var i=0;i < document.getElementsByName('aids').length;i++)
		{
			  if(document.getElementsByName('aids')[i].checked){
				if(str=='') str += document.getElementsByName('aids')[i].value;
				else str += ',' + document.getElementsByName('aids')[i].value;
			  }
		}
		
		if(str=='')
		{
			alert('你没选择任何信息！');
			return false;
		}
		else
		{
			location="export_userlogin_info.php?aids="+str;
		}
	}
}
</script>
</head>
<body background='img/allbg.gif' leftmargin='8' topmargin='8'>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#D1DDAA">
  <form name='form1' method='post' action='lang_edit.php' onSubmit='return checkSubmit();'>
  	<input type='hidden' name='dopost' value='delall'/>
  <tr>
    <td height="28" background="img/tbg.gif" colspan="6">
  <div style="float:left">
  	<b>用户登录信息统计</b>	</div>  </td>
</tr>
  <tr align="center" bgcolor="#F9FCEF" height="26">
          <td width="6%">选择</td>
          <td width="24%">用户名</td>
          <td width="20%">登录IP</td>
          <td width="25%">登录时间</td>
          <td width="25%">管理</td>
        </tr>
        {rsms:datalist}
        <tr align="center" bgcolor="#FFFFFF" height="26" onMouseMove="javascript:this.bgColor='#FCFDEE';"
        	 onMouseOut="javascript:this.bgColor='#FFFFFF';">
          <td><input type='checkbox' name='aids' value='{rsms:field.id/}' class='np' /></td>
          <td>{rsms:field.username/}</td>
          <td>{rsms:field.loginip/}</td>
          <td>{rsms:field.logintime function="GetDateTimeMk(@me)" /}</td>
          <td>
		        <a href='userlogin_edit.php?id={rsms:field.id/}&dopost=delete'>[删除]</a>
		      </td>
        </tr>
		{/rsms:datalist}
     <tr bgcolor="#FDFEEF" height="28">
      <td colspan="6">
      	　
        <a href='#' onclick='Sel("all")' class='np coolbg'>[全选]</a>
      	<a href='#' onclick='Sel("none")' class='np coolbg'>[取消]</a>
      	<a href='#' onclick='checkSubmit("sel")' class='np coolbg'>根据选择导出成EXCEL</a>
        <a href='#' onclick='checkSubmit("total")' class='np coolbg'>全部记录导出成EXCEL</a>
        从 <input type="text" name="starttime" id="starttime" value="<?php echo GetDateMk(time()); ?>" style="width:160px" /> 到
         <input type="text" name="endtime" id="endtime" value="<?php echo GetDateMk(time()); ?>" style="width:160px" />
        <a href='#' onclick='checkSubmit("period")' class='np coolbg'>根据时间段导出成EXCEL</a>      </td>
     </tr>
     <tr align="center" bgcolor="#F9FCEF" height="28">
      <td colspan="6">
      	{rsms:pagelist listsize=6/}      </td>
     </tr>
    </form>
   </table>
   </td>
</tr>
</table>
</body>
</html>